package com.zk.box.controller;

import com.zk.box.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by 15911 on 2019/1/27.
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("/getUser")
    public Object getUser(@RequestParam Integer id){
        return userService.getUser(id);
    }

    @GetMapping("/getUsers")
    public Object getUsers(){
        return userService.getUsers();
    }
}
